1. Field of Invention
The present invention relates to a method of bad pixel correction. More particularly, the present invention relates to a method of bad pixel flag on dark columns for bad pixel correction.
2. Description of Related Art
As the multimedia era is coming, digital information, such as digital images or digital movies, becomes more popular. Modern technology has highly developed, and the cost of image sensors for generating digital images or pictures reduces. More people can access these high technological products. However, there are still some problems about the image sensors.
Due to the current process, it is hard to fabricate an image sensor perfectly without any bad or defective pixel thereon. Therefore, there are always some defective pixels on the image sensor after it is fabricated. The image or picture sensed by the defective pixels will affect the quality of the image or picture. And the following imaging procedure, such as color processing or image compressing etc, will also affected. How to reduce the affect of the defective pixels of the image sensor becomes a significant topic.
Generally, if an image sensor has a bad pixel correction function, the correction scheme typically uses neighboring good pixel values to average the bad and good pixels, and then replaces the bad pixel with the averaged value. Furthermore, if one of the neighboring pixels is also bad, the correction scheme then uses the good pixel to replace the original bad pixel value. If both neighboring pixels are bad, the correction scheme uses the original value.
However, according to the mentioned conventional correction scheme, one problem occurs when the bad pixel is at the first location of a row. FIG. 1A shows the situation. Referring to FIG. 1A, because the image sensor is usually surrounded by dark pixels, which are covered with metal layers, to obtain the dark values of the image sensor. Therefore, when the image sensor tries to correct the bad pixel B at the first location 14 of a row 10, correction scheme averages the dark pixel D located at position 12 with the neighboring good pixel G located at position 16.
Ideally, the dark pixel D doesn""t receive light information when the dark pixel D and the good pixel G are averaged. An incorrect value for the image sensor is still obtained. Namely, the bad pixel is not corrected.
Similarly, FIG. 1B shows a situation that a bad pixel is located at the end of a row. Referring to FIG. 1B, when the image sensor tries to correct the bad pixel B at the first location 14xe2x80x2 of a row 10, correction scheme averages the dark pixel D located at position 12xe2x80x2 with the neighboring good pixel G located at position 16xe2x80x2. The Correction scheme averages the dark pixel D (12xe2x80x2) and the good pixel G (16xe2x80x2). An incorrect value for the image sensor is still obtained. Namely, the bad pixel is not corrected.
Accordingly, no matter the bad pixel is located at the beginning or end of a row, the conventional correction scheme does not work normally.
The invention provides a method of bad pixel correction for an image sensor. The image sensor has a plurality of rows, and each row includes at least one dark pixel on both ends of the row and valid pixels. The method comprises the steps of inserting a dummy value with a bad pixel flag into a first in first out (FIFO), wherein the dummy value is used for replacing a value of the dark pixel; determining whether a control signal is asserted, wherein the control signal is used for indicating that a current pixel is the valid pixels when the control signal is asserted; writing the values of the valid pixels into the FIFO when the control signal is asserted; determining whether the control signal is deasserted; and inserting a dummy value with a bad pixel flag into the FIFO when the control signal is deasserted.
The invention provides a method of bad pixel correction for an image sensor. The image sensor has a plurality of rows, and each row having a plurality of pixels consisting of valid pixels and dark pixels on both ends of the row.
First, a control signal is generated for indicating that a current pixel of the image sensor is a valid pixel or a dark pixel. Then, write a dummy value with a bad pixel flag into a first in first out (FIFO) if the control signal indicates the current pixel is the dark pixel; and write the value of the current pixel into the FIFO if the control signal indicates the current pixel is the valid pixel. A bad pixel correction is performed according to data stored in the FIFO.
Advantageously, the present invention provides a method of bad pixel correction. The method provides an easy way to avoid using dark pixel values when correcting the bad pixels for image sensors. In addition, the present method also reduces the cost.
It is to be understood that both the foregoing general description and the following detailed description are exemplary, and are intended to provide further explanation of the invention as claimed.